package redisMdw

import (
	"context"
	"fmt"
	"github.com/redis/go-redis/v9"
)

var client *redis.Client
var ctx = context.Background()

func init() {
	client = redis.NewClient(&redis.Options{
		Addr:     "127.0.0.1:6379",
		Password: "",
		DB:       0,
	})
}

func Doit() {
	res, err := client.Set(ctx, "name", "chris", 0).Result()
	if err == nil {
		fmt.Println(res)
	} else {
		panic(err)
	}
}
